<?php
namespace Lun\HuabanluPhp;
class Log{

    static $root = null;

    public static function info($content)
    {
        if(self::$root == null){
            self::$root = realpath(dirname(__DIR__)) . DIRECTORY_SEPARATOR;
        }
        file_put_contents(self::$root.'Log/lun'.date('Ymd').'.log',$content.PHP_EOL,FILE_APPEND );
    }

    public static function top()
    {
        if(self::$root == null){
            self::$root = realpath(dirname(__DIR__)) . DIRECTORY_SEPARATOR;
        }
        file_put_contents(self::$root.'Log/lun'.date('Ymd').'.log',PHP_EOL.PHP_EOL.PHP_EOL,FILE_APPEND );
    }
}